package com.yt.app.core.model;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * Description
 * <p>
 *     我的联系人
 * </p>
 * DATE 2017/10/3.
 *
 * @author liujunshi.
 */
@ApiModel(value = "UserContact", description = "我的联系人")
public class UserContact implements Serializable{
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "用户ID", hidden = true, required = false)
    private Long uid;
    @NotBlank(message = "请输入姓名")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;
    @ApiModelProperty(value = "性别:男/女", required = true)
    private String sex;
    @NotBlank(message = "请输入身份证号")
    @ApiModelProperty(value = "身份证号", required = true)
    private String identity;

    @NotBlank(message = "手机不能为空")
    @Pattern(regexp = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message = "手机号码格式不正确，请重新输入")
    @ApiModelProperty(value = "手机号", required = true)
    private String mobile;
    @ApiModelProperty(value = "地址", required = false)
    private String address;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
